<div class=" ui-g">
    <!-- 搜索 begin-->
    <div class="ui-g-12 ui-g-nopad">
        <p-panel header="筛选查询" [collapsed]="false" headerClass="bg-eaeaea border-none" search="编号/接收用户ID" (onSearch)="search($event);" (searchTextChange)="searchTextChange($event);">
            <div class="m-r-15 inline-block">
                <span class="p-r-10">类型：</span>
                <p-dropdown [justValue]="true" dataKey="code" optionLabel="name" styleClass="width-150" [options]="dynamicTypeArr" [(ngModel)]="searchObj.dynamicType" ></p-dropdown>
            </div>
            <div class="m-r-15 inline-block">
                <span class="p-r-10">项目阶段：</span>
                <p-dropdown [justValue]="true" dataKey="code" optionLabel="name" styleClass="width-150" [options]="projectStageArr" [(ngModel)]="searchObj.projectStage" ></p-dropdown>
            </div>
            <div class="m-r-15 inline-block">
                    <span class="p-r-10">状态：</span>
                    <p-dropdown [justValue]="true" dataKey="code" optionLabel="name" styleClass="width-150" [options]="sendstatusArr" [(ngModel)]="searchObj.sendstatus" ></p-dropdown>
            </div>
            <div class="inline-block pull-right">
                <button pButton type="button" (click)="search()" label="查询" class="btn btn-success m-r-10"></button>
                <button icon="fa-search-plus" pButton type="button" (click)="isShowH = true" label="高级搜索" class="btn btn-primary"></button>
            </div>
        </p-panel>
    </div>
    <!-- 搜索 end-->

    <!-- 列表 begin-->
    <div class="ui-g-12 ui-g-nopad m-t-20">
        <div class="content-section implementation b-b-25">
            <p-dataTable [value]="listData" [totalRecords]="totalRecords" [rows]="20" [rowsPerPageOptions]="[20,50,100,300]" [loading]="loading"
                [lazy]="true" (onLazyLoad)="loadCarsLazy($event)" scrollHeight="100px" [paginator]="true" [pageLinks]="4" [(selection)]="selectedItem"
                [headerCheckboxToggleAllPages]="true" [emptyMessage]="'没有搜到您想要的数据'">
                <p-header>
                    <button pButton type="button" label="撤回" class="btn btn-secondary" (click)="withdraw()"></button>
                    <button pButton type="button" label="删除" class="btn btn-secondary" (click)="delete()"></button>
                </p-header>
                <p-column [style]="{'width':'38px'}" selectionMode="multiple" ></p-column>
                <p-column *ngFor="let col of colsSelected" [field]='col.field' [header]='col.header' [sortable]="col.sortable" [style]="{'width':col.width}" >
                    <ng-template let-index='rowIndex' let-data='rowData' pTemplate='body' *ngIf="col.tem">
                        <div *ngIf="col.field === 'code'" (click)="info(data.code)" style="color:#1a91eb;cursor:pointer;">
                            {{data.code}}
                        </div>
                        <!-- <div *ngIf="col.field === 'isFavor'">
                            {{data.isFavor==true ? '是':'否'}}
                        </div>
                        <div *ngIf="col.field === 'isBoring'">
                            {{data.isBoring==true ? '是':'否'}}
                        </div> -->
                    </ng-template>
                </p-column>
            </p-dataTable>
        </div>

    </div>
    <!-- 列表 end-->

    <!-- 高级搜索 brgin-->
    <p-dialog header="添加筛选条件" [(visible)]="isShowH" modal="modal" width="800" [responsive]="true">
            <p-header>
                <span class="font-12">  (注：将您要添加的筛选条件进行改动，就视为添加该筛选条件。如不需要，请改回默认。)</span>
            </p-header>

            <div class="ui-g">
                <div class="ui-g-6">
                    <div class="table-row">
                        <div class="table-cell text-right p-r-10">编号：</div>
                        <div class="table-cell">
                            <input type="text" placeholder="请输入编号" class="p-input width-220" pInputText [(ngModel)]="searchHighObj.code">
                        </div>
                    </div>
                    <div class="table-row">
                        <div class="table-cell text-right p-r-10">项目名称：</div>
                        <div class="table-cell">
                            <input type="text" placeholder="请输入项目名称" class="p-input width-220" pInputText [(ngModel)]="searchHighObj.projectName">
                        </div>
                    </div>
                    <div class="table-row">
                        <div class="table-cell text-right p-r-10">项目阶段：</div>
                        <div class="table-cell ">
                            <p-dropdown [justValue]="true" dataKey="code" optionLabel="name" styleClass="width-220" [options]="projectStageArr" [(ngModel)]="searchHighObj.projectStage"></p-dropdown>
                        </div>
                    </div>
                    <div class="table-row">
                        <div class="table-cell text-right p-r-10">状态：</div>
                        <div class="table-cell">
                            <p-dropdown [justValue]="true" dataKey="code" optionLabel="name" styleClass="width-220" [options]="sendstatusArr" [(ngModel)]="searchHighObj.sendstatus"></p-dropdown>
                        </div>
                    </div>
                    <div class="table-row">
                        <div class="table-cell text-right p-r-10">发送时间(开始)：</div>
                        <div class="table-cell ">
                            <p-calendar [(ngModel)]="searchHighObj.sendTimeBegin" placeholder="请选择发送时间(开始)" styleClass="p-calendar  width-220" inputStyleClass="height-full"
                                (onSelect)="calendarChangeHigh('sendTimeBegin')" [maxDate]='selectedHighObj.sendTimeEnd' ></p-calendar>
                        </div>
                    </div>
                </div>

                <div class="ui-g-6">
                    <div class="table-row">
                        <div class="table-cell text-right p-r-10">类型：</div>
                        <div class="table-cell ">
                            <p-dropdown [justValue]="true" dataKey="code" optionLabel="name" styleClass="width-220" [options]="dynamicTypeArr" [(ngModel)]="searchHighObj.dynamicType"></p-dropdown>
                        </div>
                    </div>
                    <div class="table-row">
                        <div class="table-cell text-right p-r-10">项目编号：</div>
                        <div class="table-cell">
                            <input type="text" placeholder="请输入项目编号" class="p-input width-220" pInputText [(ngModel)]="searchHighObj.projectCode">
                        </div>
                    </div>
                    <div class="table-row">
                        <div class="table-cell text-right p-r-10">发布人：</div>
                        <div class="table-cell ">
                            <input type="text" placeholder="请输入发布人" class="p-input width-220" pInputText [(ngModel)]="searchHighObj.userName">
                        </div>
                    </div>
                    <div class="table-row">
                        <div class="table-cell text-right p-r-10">接收用户ID：</div>
                        <div class="table-cell ">
                            <input type="text" placeholder="请输入接收用户ID" class="p-input width-220" pInputText [(ngModel)]="searchHighObj.receiverCode">
                        </div>
                    </div>
                    <div class="table-row">
                        <div class="table-cell text-right p-r-10">发送时间(结束)：</div>
                        <div class="table-cell ">
                            <p-calendar [(ngModel)]="searchHighObj.sendTimeEnd" placeholder="请选择发送时间(结束)" styleClass="p-calendar  width-220" inputStyleClass="height-full"
                                (onSelect)="calendarChangeHigh('sendTimeEnd')" [minDate]='selectedHighObj.sendTimeBegin' ></p-calendar>
                        </div>
                    </div>
                </div>

            </div>

            <p-footer>
                <button pButton type="button" (click)="searchHighObj={};selectedHighObj={};" label="重置" class="btn btn-secondary m-r-20" ></button>
                <button pButton type="button" (click)="searchHigh()" label="查询" class="btn btn-success"></button>
            </p-footer>
    </p-dialog>
    <!-- 高级搜索 end-->

</div>